﻿using Registro_de_Venta_Ate.Entidades;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Registro_de_Venta_Ate
{
    public partial class FCliente : Form
    {
        ClienteDS Clientes;
        DataTable TCliente;
        public FCliente()
        {
            InitializeComponent();
        }

        private void FCliente_Load(object sender, EventArgs e)
        {
            TCliente = NCliente.GetClientes();
            Clientes = new ClienteDS();
            Clientes.Tables.Add(TCliente);
            dgvLista.DataSource = Clientes.Tables[0];
        }

        private void txtBuscar_TextChanged(object sender, EventArgs e)
        {
            Clientes.Tables[0].DefaultView.RowFilter = ("telefono like '%"+txtBuscar.Text+"%'");
            dgvLista.DataSource = Clientes.Tables[0].DefaultView;
        }
    }
}
